import java.util.*;
import com.DefectTracking.*;

/*
This test driver creates an instance of the defect manager, makes a call to get all of the defects
from the database and prints them to stdout.
*/
public class DMTestDriver {

    public static void main(String[] args) {
		List<Defect> defectTable = new ArrayList<Defect>();
        DefectManager dm = new DefectManager();
       defectTable = dm.getAllOpenDefects();

       for (Defect d : defectTable) {
		   d.printDefect(false);
	   }

	   String UserID = "2";

	   defectTable = dm.getDefectsForUser(UserID);
       for (Defect d : defectTable) {
		   d.printDefect(true);
	   }
    }
}